﻿CREATE TABLE [dbo].[Finance_RunningAccount_deleteMore] (
    [Id]               INT              IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL,
    [RId]              UNIQUEIDENTIFIER DEFAULT (newid()) ROWGUIDCOL NULL,
    [CreateDate]       DATETIME         DEFAULT (getdate()) NULL,
    [TradeDate]        NVARCHAR (10)    NULL,
    [Summary]          NVARCHAR (200)   NULL,
    [AccountsTypeId]   INT              NULL,
    [AccountsTypeName] NVARCHAR (50)    NULL,
    [ParentId]         INT              DEFAULT ((0)) NULL,
    [ParentName]       NVARCHAR (50)    NULL,
    [SubjectId]        INT              NULL,
    [SubjectName]      NVARCHAR (50)    NULL,
    [PaymentTypeId]    INT              NULL,
    [PaymentTypeName]  NVARCHAR (50)    NULL,
    [BankId]           INT              NULL,
    [BankName]         NVARCHAR (50)    NULL,
    [Income]           NUMERIC (18, 2)  NULL,
    [Outlay]           NUMERIC (18, 2)  NULL,
    [Agent]            NVARCHAR (50)    NULL,
    [AgentName]        NVARCHAR (50)    NULL,
    [UserName]         NVARCHAR (50)    NULL,
    [EName]            NVARCHAR (50)    NULL,
    [CompanyId]        INT              NULL,
    [Description]      NVARCHAR (2000)  NULL,
    [BillNumber]       NVARCHAR (50)    NULL,
    [OrderId]          NVARCHAR (50)    NULL,
    [Renling]          INT              DEFAULT ((1)) NULL,
    [IOTypeId]         INT              DEFAULT ((0)) NULL,
    [isGreen]          INT              DEFAULT ((0)) NULL,
    [l_id]             INT              DEFAULT ((0)) NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
CREATE NONCLUSTERED INDEX [IX_Finance_RunningAccount_RId]
    ON [dbo].[Finance_RunningAccount_deleteMore]([RId] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_Finance_RunningAccount_CompanyId]
    ON [dbo].[Finance_RunningAccount_deleteMore]([CompanyId] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_Finance_RunningAccount]
    ON [dbo].[Finance_RunningAccount_deleteMore]([AccountsTypeId] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_Finance_RunningAccount_PaymentTypeId]
    ON [dbo].[Finance_RunningAccount_deleteMore]([PaymentTypeId] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_Finance_RunningAccount_CreateDate]
    ON [dbo].[Finance_RunningAccount_deleteMore]([CreateDate] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_Finance_RunningAccount_TradeDate]
    ON [dbo].[Finance_RunningAccount_deleteMore]([TradeDate] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_UserName]
    ON [dbo].[Finance_RunningAccount_deleteMore]([UserName] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_Renling]
    ON [dbo].[Finance_RunningAccount_deleteMore]([Renling] ASC);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'0：正常收入。1：绿色通道成单（认领绿色通道的成单时为1）', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Finance_RunningAccount_deleteMore', @level2type = N'COLUMN', @level2name = N'isGreen';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'报销ID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Finance_RunningAccount_deleteMore', @level2type = N'COLUMN', @level2name = N'l_id';

